<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="UTF-8">
	<title>Insert title here</title>
</head>
<body>
	<div th:replace="~{publicStyle/header :: header}"></div>
	<h3 th:text="${commodityModel.getAttribute('title')}"></h3>
	<div>
		<a href="/commodity/form.html" th:href="@{/commodity/form}">添加商品</a>
	</div>
	<table border="1">
		<thead>
		<tr>
			<td>商品id</td>
			<td>商品名称</td>
			<td>价格</td>
			<td>库存</td>
			<td>描述</td>
			<td>修改时间</td>
		</tr>
		</thead>
		<tbody>
		<tr th:if="${commodityModel.getAttribute('priceList').size()} eq 0">
			<td colspan="8">没有用户信息</td>
		</tr>
		<tr th:each="commodity,Stat : ${commodityModel.getAttribute('priceList')}">
			<td th:text="${commodity.id}"></td>
			<td><a th:href="@{'/Hello/'+${commodity.id}}" th:text="${commodity.name}"></a></td>
			<td th:text="${commodity.price}"></td>
			<td th:text="${commodity.inventory}"></td>
			<td th:text="${commodity.describe}"></td>
			<td th:text="${commodity.times}"></td>
		</tr>
		</tbody>
	</table>
	<div th:replace="~{publicStyle/footer :: footer}"></div>
</body>
</html>